package com.winhxd.b2c.common.domain.customer.model;

import com.winhxd.b2c.common.constant.CustomerConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
/**
 * @author baishenghu
 */
@ApiModel("会员信息:包含一级分销商和二级分销商和会员")
@Data
public class CustomerUserInfo {

    public CustomerUserInfo(){

    }
    public CustomerUserInfo(String openid){
        this.setCreated(new Date());
        this.setLevel(0);
        this.setStatus(1);
        this.setOpenid(openid);
        this.setBindStatus(CustomerConstant.BIND_STATUS);
        this.setBindTime(new Date());
    }

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("用户手机号")
    private String customerMobile;

    @ApiModelProperty("微信openId")
    private String openid;

    @ApiModelProperty("纬度")
    private Double lat;

    @ApiModelProperty("经度")
    private Double lon;

    @ApiModelProperty("会员姓名")
    private String nickName;


    @ApiModelProperty("创建时间")
    private Date created;

    @ApiModelProperty("创建人ID")
    private Long createdBy;

    @ApiModelProperty("创建人名称")
    private String createdByName;

    @ApiModelProperty("修改时间")
    private Date updated;

    @ApiModelProperty("修改人ID")
    private Long updatedBy;

    @ApiModelProperty("修改人名称")
    private String updatedByName;

    @ApiModelProperty("登录session缓存key")
    private String sessionKey;

    @ApiModelProperty("用户状态1激活,0冻结")
    private Integer status;

    @ApiModelProperty("登录TOKEN值")
    private String token;

    @ApiModelProperty("数盟id")
    private String digitalUnionId;

    @ApiModelProperty("用户上级:会员对应的二级分销商的id,二级分销商和一级分销商的上级id此表为null")
    private Long parentId;

    @ApiModelProperty("会员渠道ID")
    private Long channelId;

    @ApiModelProperty("微信姓名")
    private String wechatName;

    @ApiModelProperty("性别 0代表女 1代表男")
    private Integer sex;

    @ApiModelProperty("生日")
    private Date birthday;

    @ApiModelProperty("用户头像")
    private String headImg;

    @ApiModelProperty("总收入:总提现金额")
    private BigDecimal totalIncome;

    @ApiModelProperty("积分")
    private Integer integral;

    @ApiModelProperty("余额:可提现余额")
    private BigDecimal balance;

    @ApiModelProperty("会员等级 1:一级分销商 2：二级分销商 0：会员")
    private Integer level;

    @ApiModelProperty(value = "店铺名称")
    private String storeName;

    @ApiModelProperty(value = "商城简介")
    private String storeExplain;

    @ApiModelProperty(value = "商城logo")
    private String shopLogo;

    @ApiModelProperty(value = "app登录状态:0登录、1退出;")
    private String appLoginStatus;

    @ApiModelProperty(value = "状态（1.运营中,0.已关闭）")
    private Short storeStatus;

    @ApiModelProperty(value = "门店小程序码的url地址")
    private String miniProgramCodeUrl ;

    @ApiModelProperty(value = "店铺分享邀请会员二维码")
    private String customerStoreCodeUrl ;

    @ApiModelProperty(value = "店铺邀请开店二维码")
    private String storeOpenCodeUrl ;

    @ApiModelProperty(value = "绑定状态（0.未绑定,1.已绑带）")
    private Short bindStatus=null;

    @ApiModelProperty(value = "访问时间")
    private Date accessTime;

    @ApiModelProperty(value = "访问时间")
    private Date bindTime;
}